package no.sachmuld.methodcombination.examples.reflection.scalatraitstyle;

/**
 *
 */
public class Main implements Runnable {

    @Override
    public void run() {

        Beverage[] beverages = {
                new Coffee(),
                new Coffee().with(new Milk()),
                new Tea().with(new Milk()),
                new Coffee().with(new Milk(), new Mocha()),
                new DecafCoffee().with(new Milk())
        };

        for (Beverage beverage : beverages) {
            System.out.println(beverage + ": " + beverage.cost());
        }

    }

    public static void main(String... args) throws Exception {

        new Main().run();

    }

}
